Main Memory Scheduling
Small Group

Assume that you have four different processes with the following attributes:
Process	Arrival time	CPU Burst	I/O Burst	Total CPU time	
A	3	4	1	11	
B	2	3	2	7	
C	1	2	3	6	
D	0	1	4	3	
When a process arrives, it alternates CPU bursts with IO bursts, and when it finishes the total CPU time needed, it does one final IO burst.
IN YOUR GROUP:
Perform a scheduling simulation using these four processes according to the following algorithms:
1. First Come First Serve
 2. Round Robin with time slice = 2
For each simulation, if multiple processes would be placed into the ready queue at the same time, give highest priority to a newly arriving process, then a process completing its I/O burst, and lastly a process that has just finished its time slice.
Turn in the timeline for each simulation.
I recommend you show the work on a spreadsheet, but you may draw these by hand or do them using a different program.  
 Compute the turnaround time and queue waiting time for each process, as well as the percentage idle time for the CPU overall. 
Indicate which scheduling scheme you think performs the best.

CHALLENGE for EXTRA LEARNING:
Assume that you have four different processes with the following attributes:
Process	Arrival time	CPU Burst	I/O Burst	Total CPU time	
A	3	4	1	11	
B	2	3	2	7	
C	1	2	3	6	
D	0	1	4	3	
When a process arrives, it alternates CPU bursts with IO bursts, and when it finishes the total CPU time needed, it does one final IO burst.
Perform a scheduling simulation according to the following algorithm:
A 3 level feedback queue where the top queue is managed as Round Robin with time slice = 1, the middle queue is managed as Round Robin with time slice = 3, and the bottom queue is managed as FCFS. Assume preemption of lower queue processes by higher queue processes.  
The basic algorithm for a 3 level feedback queue can be found at:
https://en.wikipedia.org/wiki/Multilevel_feedback_queue
1.	A new process is inserted at the end (tail) of the top-level queue.
2.	At some stage the process reaches the head of the queue and is assigned the CPU.
3.	If the process is completed within the time quantum of the given queue, it leaves the system.
4.	If the process voluntarily relinquishes control of the CPU, it leaves the queuing network, and when the process becomes ready again it is inserted at the tail of the same queue which it relinquished earlier.
5.	If the process uses all the quantum time, it is pre-empted and inserted at the end of the next lower level queue.
6.	This scheme will continue until the process completes or it reaches the base level queue.

Main Memory Scheduling
Individual Assignment

Assume that you have four different processes with the following attributes:
Process	Arrival time	CPU Burst	I/O Burst	Total CPU time	
A	3	4	1	11	
B	2	3	2	7	
C	1	2	3	6	
D	0	1	4	3	
When a process arrives, it alternates CPU bursts with IO bursts, and when it finishes the total CPU time needed, it does one final IO burst.
Perform a scheduling simulation using these four processes according to the following algorithms:
1.  Round Robin with time slice = 1
2.  Shortest Job (CPU Burst Time) First
For each simulation, if multiple processes would be placed into the ready queue at the same time, give highest priority to a newly arriving process, then a process completing its I/O burst, and lastly a process that has just finished its time slice.
Turn in the timeline for each simulation.
I recommend you show the work on a spreadsheet, but you may draw these by hand or do them using a different program.  
 Compute the turnaround time and queue waiting time for each process, as well as the percentage idle time for the CPU overall. 
Indicate which scheduling scheme (of the FOUR) you think performs the best.